<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta charset="UTF-8">
    <!--申明当前网页的编码集UTF-8-->
    <meta name="Generator" content="EditPlus®">
    <!--编辑器的名称-->
    <meta name="Author" content="作者是谁">
    <meta name="Keywords" content="关键词">
    <meta name="Description" content="描述和简介">
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        .heart div {
            width: 200px;
            height: 200px;
            position: absolute;
        }

        .heart {
            width: 300px;
            height: 300px;
            margin: 100px auto;
            position: relative;
            transform: rotate(45deg);
            animation: play 2s infinite alternate;            
        }

        .middle {
            right: 0;
            bottom: 0;
            background: red;
            border-bottom: 1px solid black;
            border-right: 1px solid black;
            z-index: 3;
        }

        .left {
            left: 0;
            bottom: 0;
            background: red;
            border: 1px solid black;
            border-radius: 50%;
            overflow: hidden;
            z-index: 1;
        }

        .right {
            right: 0;
            top: 0;
            background: red;
            border-radius: 50%;
            overflow: hidden;
            border: 1px solid black;
        }


        /*注意要在动画的时候，可能会导致覆盖，这个时候也是需要去将其进行旋转处理的*/
        @keyframes play {
            25% {
                transform: scale(1.2) rotate(45deg)
            }
            50% {
                transform: scale(1.3) rotate(45deg)
            }
            75% {
                transform: scale(1.2) rotate(45deg)
            }
        }
    </style>
</head>

<body>
    <div class="heart">
        <div class="left"></div>
        <div class="middle"></div>
        <div class="right"></div>
    </div>
</body>

</html>